Best method to store list of foreign keys in a model?
存储外键列表模型中最好的方法吗?
It has been so since the 1960s when packaged food list appeared with the label: "Store in the refrigerator".
自20世纪60年代包装食品清单上出现“储存于冰箱”的标签以来,情况就一直如此。
Sam was given a list of books to read by his teacher, but he has just had an eye operation and needs some apps that can store the books and read them aloud to him.
老师给了山姆一张要读的书的清单,但他刚刚做了眼部手术,需要一些可以存储书并对他出声朗读的应用程序。
And in fact, it depends on how I store a list.
实际上,它依赖于我怎么存储这个数组的。
You try to design actually I'm going to come back to that in a second. It's like you're trying to use a hash function that spread things out pretty evenly. But the places you store into in those lists may have to themselves have a small list in there, and when you go to check something, you may have to do a linear search through the elements in that list.
你尝试着去设计,实际上过会儿我会回头讲解这个问题,类似于你需要用一个哈希函数,非常平均的将物体分发出去,但是在列表中你数据,映射到的地方可能会有自己的一小段列表,当你回头查找数据的时候,你可能需要在那一小段列表中做线性查找。
应用推荐